package com.vjwealth.android.nos.widget

import android.app.Activity
import android.support.v7.app.AlertDialog
import com.vjwealth.android.nos.R

/**
 * projectName KNOS
 * date 2017/9/26
 * description com.vjwealth.android.nos.widget
 */
class CustomeAlertDialog private constructor() {

    private object SingletonHolder {
        val INSTANCE = CustomeAlertDialog()
    }


    fun getLoadingAlertDialog(activity: Activity): AlertDialog {
        val normalDialog = AlertDialog.Builder(activity, R.style.CustomerDialog)
        normalDialog.setView(R.layout.layout_loading)
        val alertDialog = normalDialog.create()
        alertDialog.setCanceledOnTouchOutside(false)
        alertDialog.setCancelable(true)
        return alertDialog
    }

    companion object {

        val instance: CustomeAlertDialog
            get() = SingletonHolder.INSTANCE
    }
}